﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using PasswordManager.Classes;

namespace PasswordManager
{
    public partial class AddCredentials : Form
    {
        public Node NewCredentials { get; set; }
        

        public AddCredentials()
        {
            this.NewCredentials = new Node();
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.NewCredentials.NodeId = Guid.NewGuid();
            this.NewCredentials.Title = textBox_title.Text;
            this.NewCredentials.Username = textBox_username.Text;
            this.NewCredentials.Password = textBox_password.Text;
            this.NewCredentials.Description = textBox_description.Text;
            this.NewCredentials.Addition = textBox_additional.Text;            
            this.Close();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
